package mcchristian;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;

public class Pary_Action extends ActionSupport {

	private List<Pray> prays = new ArrayList<Pray>();
	private String message;
	
	public String execute() throws Exception  
    {  
		Map session = ActionContext.getContext().getSession();
		Excel_Function excel_function = new Excel_Function();
		if ((String)session.get("rootpath") == null){
			return "INDEX";  
		}	
		String excelPath = (String)session.get("rootpath") + "db\\pray.xls";
		prays = excel_function.contentPrayReading(excelPath);
        return SUCCESS;  
    }

	public List<Pray> getPrays() {
		return prays;
	}

	public void setPrays(List<Pray> prays) {
		this.prays = prays;
	}  
	
	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}
	
}
